package com.wxx.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/err/")
public class ErrorController {

    @RequestMapping("error")
    public Object hello(ModelMap map){
        int a = 1 / 0;
        return "index";
    }

    @RequestMapping("getErrorAjax")
    public Object getErrorAjax(ModelMap map){
        return "errorAjax";
    }


    @RequestMapping("errorAjax")
    @ResponseBody
    public Object errorAjax(ModelMap map){
        int a = 1 / 0;
        return "errorAjax";
    }

}
